package com.diamondparking.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import org.hibernate.validator.NotEmpty;

@Entity
@NamedQueries({
    @NamedQuery(name = "Employee.authenticate",
    query = "SELECT e FROM Employee e WHERE e.username=:username AND e.password=:password")
})
public class Employee implements Serializable {

    @Id
    private long id;
    @NotEmpty
    @Column(unique=true)
    private String username;
    @NotEmpty
    private String password;
    @NotEmpty
    private String name;
    private String party;

    public Employee() {
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParty() {
        return party;
    }

    public void setParty(String party) {
        this.party = party;
    }
    
    public String toString() {
        return username;
    }
}
